load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/nervous_system/common",
    "@crate_index//:ic-cdk",
    "@crate_index//:lazy_static",
    "@crate_index//:rust_decimal",
    "@crate_index//:serde",
    "@crate_index//:serde_json",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:rust_decimal_macros",
]

DEV_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:assert_matches",
    "@crate_index//:proptest",
    "@crate_index//:serde_bytes",
]

ALIASES = {}

rust_library(
    name = "neurons_fund",
    srcs = glob(
        ["src/**"],
        exclude = ["src/**/*tests.rs"],
    ),
    aliases = ALIASES,
    crate_name = "ic_neurons_fund",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.0.1",
    deps = DEPENDENCIES,
)

rust_test(
    name = "neurons_fund_test",
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    proc_macro_deps = MACRO_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)
